package com.acme.team03.messages;

import java.util.HashMap;
import java.util.Map;

public class TextMessage implements Message {
	private String text;
	private Map<String, Object> properties = new HashMap<>();
	public TextMessage(String text) {
		super();
		this.text = text;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setProperty(String name, Object value) {
		properties.put(name, value);

	}

	public Object getProperty(String name) {
		return properties.get(name);
	}

	public boolean propertyExists(String name) {
		return properties.keySet().contains(name);
	}
}
